package exceptiontest;

public class TryCatch {
    public static void main(String[] args) {
        System.out.println("程序开始了");
        try {
            String line=null;
            System.out.println(line.length());
        }catch (Exception e){
            System.out.println("找到异常并解决");
        }
        System.out.println("程序结束了");
    }
}
